package com.ibeetl.admin.api.web;

import com.ibeetl.admin.api.entity.ScenicSpot;
import com.ibeetl.admin.core.web.JsonResult;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Tag(
        name = "ScenicSpotController")
public class ScenicSpotController {
    private final Log log = LogFactory.getLog(this.getClass());
    private static final String MODEL = "/api/scenicspot";

    @PostMapping(MODEL + "/add.json")
    @CrossOrigin
    public JsonResult<ScenicSpot> add(ScenicSpot scenicSpot) {

        return JsonResult.success(scenicSpot);
    }

    @PostMapping(MODEL + "/update.json")
    @CrossOrigin
    public JsonResult<ScenicSpot> update(ScenicSpot scenicSpot) {

        return JsonResult.success(scenicSpot);
    }

    @PostMapping(MODEL + "/del.json")
    @CrossOrigin
    public JsonResult<ScenicSpot> del(ScenicSpot scenicSpot) {

        return JsonResult.success(scenicSpot);
    }
}
